/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse_long_ } from '../models/BaseResponse_long_';
import type { BaseResponse_Page_Trade_ } from '../models/BaseResponse_Page_Trade_';
import type { BaseResponse_Page_TradeVO_ } from '../models/BaseResponse_Page_TradeVO_';
import type { BaseResponse_TradeVO_ } from '../models/BaseResponse_TradeVO_';
import type { TradeAddRequest } from '../models/TradeAddRequest';
import type { TradeQueryRequest } from '../models/TradeQueryRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class TradeControllerService {
    /**
     * addTrade
     * @param tradeAddRequest tradeAddRequest
     * @returns BaseResponse_long_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static addTradeUsingPost(
        tradeAddRequest: TradeAddRequest,
    ): CancelablePromise<BaseResponse_long_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/trade/add',
            body: tradeAddRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getTradeVOById
     * @param id id
     * @returns BaseResponse_TradeVO_ OK
     * @throws ApiError
     */
    public static getTradeVoByIdUsingGet(
        id?: number,
    ): CancelablePromise<BaseResponse_TradeVO_> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/trade/get/vo',
            query: {
                'id': id,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listTradeByPage
     * @param tradeQueryRequest tradeQueryRequest
     * @returns BaseResponse_Page_Trade_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listTradeByPageUsingPost(
        tradeQueryRequest: TradeQueryRequest,
    ): CancelablePromise<BaseResponse_Page_Trade_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/trade/list/page',
            body: tradeQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listTradeVOByPage
     * @param tradeQueryRequest tradeQueryRequest
     * @returns BaseResponse_Page_TradeVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listTradeVoByPageUsingPost(
        tradeQueryRequest: TradeQueryRequest,
    ): CancelablePromise<BaseResponse_Page_TradeVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/trade/list/page/vo',
            body: tradeQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listMyTradeVOByPage
     * @param tradeQueryRequest tradeQueryRequest
     * @returns BaseResponse_Page_TradeVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listMyTradeVoByPageUsingPost(
        tradeQueryRequest: TradeQueryRequest,
    ): CancelablePromise<BaseResponse_Page_TradeVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/trade/my/list/page/vo',
            body: tradeQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
